#ifndef BAR_CHART_H
#define BAR_CHART_H

#include <gtkmm/widget.h>
#include <cairomm/cairomm.h>
#include <deque>
#include <vector>

class BarChart
{
  public:
    BarChart(float maxval,float minval,int points);
    virtual ~BarChart();
    void DrawCall(const Cairo::RefPtr<Cairo::Context>& cr, int width, int height,Gtk::Widget* widget);
    void InputData(float point);
    void ClearFrameCounter();
  private:
    void DrawFont(const Cairo::RefPtr<Cairo::Context>& cr,std::string str,int x,int y,Gtk::Widget* widget);
    std::deque<float> oriData;
    int allPoints;
    float minval,maxval;
    long frameCounter=0;
};

#endif
